#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1e4+10;
int a[maxn];
int sum[maxn];
int cnt = 1;
void init()
{
	sum[0] = 0;
	sum[1] = 1;
	a[0] = 0;
	a[1] = 1;
	for(int i = 2;a[i-1]<maxn;i++)
	{
		a[i] = a[i-1]+i;
		sum[i] = sum[i-1]+a[i];
		cnt++;
	}
}
int main()
{
	init();
	int n;
	cin>>n;
	int ans = 0;
	for(int i = 1;i<=cnt;i++)
	{
		//cout<<sum[i]<<endl;
		if(n>=sum[i])
		{
			 ans = i;
		}
		else break;
	}
	cout<<ans<<endl;
}
